a. Field of the Invention
The present invention pertains generally to disk storage devices and specifically to the management of reservations with disk storage devices.
b. Description of the Background
Reservations are used in storage devices for allowing only certain users or computers to execute commands to the devices. For example, a reservation may allow certain users, also known as an initiator port or host, to read or write to a volume on a device. In some cases, a host may be given exclusive permission to write to a volume while several other hosts may be given permission to read the volume.
Persistent reservations are a way for hosts to reserve space on a storage device in a way that the reservation can survive a reset or a power cycle. In order for a storage device to support this type of activity, it must make certain information persistent. In some instances, persistent reservations may be required to survive a reset but not a power cycle. Such reservations must therefore be processed and deleted or removed when the power cycle occurs.
For a reservation to be set for a particular host, the host must first be registered with the volume. Registration involves logging the particular host with the volume. Such logs of registrations may be quite lengthy and complex in some instances. The commands used for processing registrations may be a subset of the reservation commands. When a reservation is to persist through a reset but not a power cycle, both the reservations and the registrations must be cleared after the power cycle.
When a storage device of this type is reset or powered-on, a great deal of activity occurs in preparing the device for I/O activity. Additionally, the device must be ready to respond to I/O requests within a short time. For a device with 256 volumes and 512 host ports, over 524,000 registrations may need to be managed during the start up period. The time consumed with management of such a large amount of records may be prohibitive when performing a start-of-day routine. Such devices with persistent reservations may be SCSI storage devices such as hard disks or storage systems with removable media such as a disk changer.
It would therefore be advantageous to provide a method for handling a large amount of registrations during a power-on phase of a storage device. It would be further advantageous if the method were able to bring the device into useful service as quickly as possible, while being able to handle large amounts of registration processing.
The present invention overcomes the disadvantages and limitations of the prior art by providing a device and method for managing a large amount of registrations after restarting the device by processing the registrations on an as-needed basis. As a volume responds to a reservation request for the first time after power-on, the registrations for that volume will be processed in preparation for the first input or output command. Further, during periods of inactivity, volumes that have not been processed may be processed.
The present invention may therefore comprise a method for processing persistent reservations after a power cycle in a computer storage device with multiple volumes comprising: completing a power-on sequence after a power cycle; setting the status of the storage device to receive I/O requests; receiving a reservation I/O request for a volume of the storage device, the volume having ax least one persistent reservation that is to persist through a restart but not a power cycle; determining that a power cycle has occurred and that the reservation is not to persist after the power cycle; performing at least some processing on the reservation; and processing the reservation I/O request.
The present invention may further comprise a computer storage device of multiple volumes with reservations that persist after a reset but not a power cycle comprising: a storage medium comprising multiple volumes; and a controller for the storage device adapted to completing a power-on sequence after a power cycle, setting the status of the storage device to receive I/O requests, receiving a reservation I/O request for a volume of the storage device, the volume having at least one persistent reservation that is to persist through a restart but not a power cycle, determining that a power cycle has occurred and that the reservation is not to persist after the power cycle, performing at least some processing on the reservation, and processing the reservation I/O request.
The advantages of the present invention are that the storage device may resume handling of input and output commands quickly after restart. Rather than performing all of the registration processing prior to resuming the first I/O command, little or no registration processing is performed prior to resuming I/O commands. Thus, the device may come on-line as fast as possible. Further, during periods of inactivity after coming on-line, any registration processing that is required for other volumes may be performed, eliminating any processing prior to the first access of those volumes.